import json
import requests
#小思chichat
def chitbot_api(question):
    url='https://api.ownthink.com/bot?appid=xiaosi&userid=user&spoken=%s'%question
    page_text=requests.get(url=url).text
    data = json.loads(page_text)
    return data['data']['info']['text']

# chitbot_api("今天北京天气怎么样")


# def chitbot_api(question):
#     url='http://127.20.17.39:5001/Answer?question=%s'%question
#     page_text=requests.post(url=url).text
#     # return page_text
#     data = json.loads(page_text)
#     return data
# # print(chitbot_api(""))